{extend name="common:base" /}
{block name="content"}
<div class="row">
<form class="form-horizontal" action="{:url('save')}" method="post">
<input type="hidden" name="id" value="{$link.id ?? 0}">
<div class="space-4"></div>
<div class="form-group">
    <label class="col-sm-1 control-label no-padding-right" for="title"> 标题 </label>
    <div class="col-sm-9">
        <input type="text" name="title" id="title" class="col-xs-10 col-sm-5" value="{$link.title ?? ''}" required="required">
        <span class="help-inline col-xs-12 col-sm-7">
            <span class="middle"></span>
        </span>
    </div>
</div>

<div class="space-4"></div>
<div class="form-group">
    <label class="col-sm-1 control-label no-padding-right" for="url"> 链接 </label>
    <div class="col-sm-9">
        <input type="text" name="url" id="url" placeholder="链接" class="col-xs-10 col-sm-5" value="{$link.url ?? ''}" required="required">
        <span class="help-inline col-xs-12 col-sm-7">
            <span class="middle"></span>
        </span>
    </div>
</div>
<div class="space-4"></div>
<div class="form-group">
    <label class="col-sm-1 control-label no-padding-right" for="form-field-4"> 站标 </label>
    <div class="col-sm-9">
        <div class="col-xs-10 col-sm-5">{notempty name="link"}{:UploadImage("logo",88,31,$link['logo'])}{else /}{:UploadImage("logo",88,31,'')}{/notempty}</div>
        <span class="help-inline col-xs-12 col-sm-7">
            <span class="middle">仅支持jpg、gif、png、bmp、jpeg。</span>
        </span>
    </div>
</div>
<div class="space-4"></div>
<div class="form-group">
    <label class="col-sm-1 control-label no-padding-right" for="o"> 排序 </label>
    <div class="col-sm-9">
        <input type="number" name="o" id="o" placeholder="" class="col-xs-10 col-sm-5" value="{$link.o ?? '0'}">
        <span class="help-inline col-xs-12 col-sm-7">
            <span class="middle">越小越靠前</span>
        </span>
    </div>
</div>
<div class="space-4"></div>
<div class="col-md-offset-2 col-md-9">
    <button id="submit" class="btn btn-info" type="submit">
        <i class="icon-ok bigger-110"></i>
        提交
    </button>

    &nbsp; &nbsp; &nbsp;
    <button class="btn" type="reset">
        <i class="icon-undo bigger-110"></i>
        重置
    </button>
</div>
</form>
</div>
{/block}